/* GUI CONVERTED from rcrpcar.p (converter v1.75) Sat Aug 12 23:00:27 2000 */
/* rcrpcar.p - Print Carrier Information for structures using abs_mstr  */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*K05Q*/ /*V8:ConvertMode=Report                                    */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                 */
/*K05Q *V8:ConvertMode = Maintenance                                    */
/* REVISION: 8.6          CREATED: 10/17/96   BY: *K003* Vinay Nayak-Sujir */
/* REVISION: 8.6    LAST MODIFIED: 02/04/97   BY: *K05Q* Vinay Nayak-Sujir */


/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan      */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan      */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb               */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

     {mfdeclre.i}
{gplabel.i} /* EXTERNAL LABEL INCLUDE */

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE rcrpcar_p_1 "Address"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

     define input parameter absid like abs_id no-undo.
     define input parameter column_pos as integer no-undo.

     define new shared variable addr as character format "x(38)" extent 6.
     define variable company as character format "x(38)" extent 6 no-undo.
     define variable addrline as character label {&rcrpcar_p_1}
        format "x(38)" no-undo.
     define variable ctr as integer no-undo.

     FORM /*GUI*/ 
           absc_seq
       absc_carrier
       addrline
     with STREAM-IO /*GUI*/  frame carr_info down.

     /* SET EXTERNAL LABELS */
     setFrameLabels(frame carr_info:handle).

     frame carr_info:column = column_pos.

     if can-find (first absc_det where absc_abs_id = absid) then do:
        for each absc_det where absc_abs_id = absid no-lock
        with frame carr_info:
        display absc_seq absc_carrier WITH STREAM-IO /*GUI*/ .

        find ad_mstr where ad_addr = absc_carrier no-lock no-error.
        if available ad_mstr then do:
           assign addr[1] = ad_name
              addr[2] = ad_line1
              addr[3] = ad_line2
              addr[4] = ad_line3.
              addr[6] = ad_country.
           {mfcsz.i addr[5] ad_city ad_state ad_zip}.
           {gprun.i ""gpaddr.p"" }
           assign company[1] = addr[1]
              company[2] = addr[2]
              company[3] = addr[3]
              company[4] = addr[4]
              company[5] = addr[5]
              company[6] = addr[6].
        end. /* if available ad_mstr */

        do ctr = 1 to 6:
           if company[ctr] <> "" then do:
              if ctr = 1 then
                 display absc_seq absc_carrier company[1] @ addrline WITH STREAM-IO /*GUI*/ .
              else
             display "" @ absc_seq "" @ absc_carrier
                 company[ctr] @ addrline WITH STREAM-IO /*GUI*/ .
              down.
           end.
        end.

        down 1.
        assign addr = ""
               company = "".

        end. /* for each absc_det */
     end. /* if can-find absc_det  */
